import {BrowserModule} from '@angular/platform-browser';
import {NgModule} from '@angular/core';

import {AppRoutingModule} from './app-routing.module';
import {AppComponent} from './app.component';
import {en_US, NgZorroAntdModule, NZ_CONFIG, NZ_I18N, NzConfig} from 'ng-zorro-antd';
import {FormsModule} from '@angular/forms';
import {HTTP_INTERCEPTORS, HttpClientModule} from '@angular/common/http';
import {BrowserAnimationsModule} from '@angular/platform-browser/animations';
import en from '@angular/common/locales/en';
import {IndexModule} from './index/index.module';
import {LoginModule} from './pages/login/login.module';
import {HttpInterceptors} from './common/http-interceptors/http-interceptors';
import {registerLocaleData} from '@angular/common';

registerLocaleData(en);
const ngZorroConfig: NzConfig = {
    // 注意组件名称没有 nz 前缀
    // button: {nzSize: 'small'},
    // message: {nzTop: 120},
    // notification: {nzTop: 120}
};

@NgModule({
    declarations: [
        AppComponent,
    ],
    imports: [
        BrowserModule,
        AppRoutingModule,
        NgZorroAntdModule,
        FormsModule,
        HttpClientModule,
        BrowserAnimationsModule,
        IndexModule,
        LoginModule
    ],
    providers: [
        {provide: NZ_I18N, useValue: en_US},
        {provide: HTTP_INTERCEPTORS, useClass: HttpInterceptors, multi: true},
        {provide: NZ_CONFIG, useValue: ngZorroConfig}

        // {provide: LocationStrategy, useClass: HashLocationStrategy}
    ],
    bootstrap: [AppComponent]
})
export class AppModule {
}
